import unittest
import nnreport


#自动发现自测case
def gen_report(dir_path,filename,repotrname):
    f=unittest.defaultTestLoader.discover(dir_path,filename)
    reports=nnreport.BeautifulReport(f)
    reports.report("这是一个自动发现的case",repotrname+".html",log_path=".")

gen_report(".","*code*.py","参数测试报告")